The invention relates to signal processing, in particular, the processing of digitized signals containing speech information. The invention provides a filter to apply a window function to a digital signal. The filter finds practical applications in Voice Activity Detection (VAD) applications, among others.
Signal processing, in particular the processing of digital signals containing speech information, requires processing by one or more filters of window design to smoothly weigh the samples of the signal. Examples of window design filters include Hamming window filters, Hanning window filters, Blackman window filters and Bartlet window filters, among others. For example, a Hamming window is defined by the following equation:                                                         window              ⁡                              (                i                )                                      =                          0.54              -                              0.46                ⁢                                  xe2x80x83                                ⁢                                  cos                  ⁡                                      (                                                                                            2                          ⁢                                                      xe2x80x83                                                    ⁢                          π                                                                          N                          -                          1                                                                    ⁢                      i                                        )                                                                                ;                      i            =            0                          ,        1        ,        …        ⁢                  xe2x80x83                ,                  N          -          1                                    (        1        )            
Where:
(a) i is the sample index in a frame;
(b) N is the number of samples per frame.
The equations that define a Hanning, Blackman and Bartlet window are not specified here since a person skilled in the art knows them.
In many signal-processing applications that require windowing, such as in VAD applications, it is customary to pre-calculate the equation defining the window function and store the resulting values in memory. In use, the values are recalled from memory and applied to the samples of the signal. This approach greatly reduces the computational requirements for real-time implementation by comparison to a calculation of the window equation for each sample of the block.
A problem arises when the signal processing apparatus is designed to window signals with different number of samples per block. In such a case, the window filter needs to be adapted from signal to signal. One possibility to effect this adaptation is to store in the memory sets of values obtained by pre-calculating the window equation for every possible signal having a different number of samples per block, where each set represents a different window. In use, only the set of values that corresponds to the signal currently being processed is employed to perform the application of the window function.
A disadvantage of this approach is the increased memory usage necessary to store the various sets of pre-calculate window values.
Under a first broad aspect, the invention provides a window filter that has an input to receive a digital signal having a plurality of successive frames, each frame having a known number of samples. The filter successively applies a window function to the successive frames of the digital signal. The filter includes:
1. a machine readable storage medium holding a basic set of values representing completely or partially a single window;
2. an adapter for producing from the basic set of values a plurality of adapted sets of values, where each adapted set of values defines completely or partially a window function and where the window functions of the adapted sets of values have windows of different sizes;
3. a computation unit to apply a window function to the frames of the digital signal by using an adapted set of values.
The advantage of this approach resides in the use of a basic set of values that represent partially or completely a single window and that are adaptable to produce adapted sets of values that define windows of different sizes. The memory requirements are reduced by comparison to a case where the memory holds a plurality of sets of values representing windows of different sizes. This is particularly true for real time implementation of a signal processing apparatus on a commercial digital signal processor where the internal memory is limited.
In a specific and non-limiting example of implementation, the window filter processes digital signals conveying voice information. The filter is part of a Linear Prediction (LP) based VAD whose output controls transmission of the encoded voice packets resulting from the operation of the chosen voice encoder and corresponding packetizer. The filter is of a Hamming window design, although other window functions can be used such as a Hanning, Blackman and Bartlet window, among others, without departing from the spirit of the invention. The window filter can process signals that require window sizes of either 240 samples or 264 samples, depending upon the encoding algorithm chosen.
The set of values to be stored in the filter memory is computed on the basis of equation (1) where N is chosen in the range defined by the smallest window size and the largest window size. For example, N is given the value of 256. To the values computed by equation (1) for N=256 are inserted eight 1""s (the maximum value of a Hamming window) at the central portion of the window. This results in a window now defined by a set of 264 values, rather than 256. Finally, since the window is symmetrical, only half of it (132 values) is stored in the memory of the filter.
In use, when filtering a signal with a window having a size of 264 samples, the entire set of values (132 values) is used to process a block of 264 samples in the signal. In particular, the 132 values are used to multiply the corresponding first 132 samples of the 264 samples block. The same operation is performed on the last 132 samples of the 264 samples block, this time the order of the 132 values being reversed.
When a window having a size of 240 samples is required, only a sub-set of the basic set of values is selected to apply the window function on the 240 samples block. For instance, only the first 120 values of the basic set of values are used to window the 240 samples block, by the process described immediately above.